 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKDomainservice/DomainserviceModel.h>

@implementation UpdateRR
-(id) initWithDomainName:(NSString*) domainName
      hostRecord:(NSString*)hostRecord
      hostValue:(NSString*)hostValue
      jcloudRes:(NSNumber*)jcloudRes
      mxPriority:(NSNumber*)mxPriority
      port:(NSNumber*)port
      ttl:(NSNumber*)ttl
      type:(NSString*)type
      weight:(NSNumber*)weight
      viewValue:(NSNumber*)viewValue { 
     self.domainName = domainName;               
     self.hostRecord = hostRecord;               
     self.hostValue = hostValue;               
     self.jcloudRes = jcloudRes;               
     self.mxPriority = mxPriority;               
     self.port = port;               
     self.ttl = ttl;               
     self.type = type;               
     self.weight = weight;               
     self.viewValue = viewValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self domainName])
    {
        [result setValue:[self domainName] forKey:@"domainName"];
    }
    if([self hostRecord])
    {
        [result setValue:[self hostRecord] forKey:@"hostRecord"];
    }
    if([self hostValue])
    {
        [result setValue:[self hostValue] forKey:@"hostValue"];
    }
    if([self jcloudRes])
    {
        [result setValue:[self jcloudRes] forKey:@"jcloudRes"];
    }
    if([self mxPriority])
    {
        [result setValue:[self mxPriority] forKey:@"mxPriority"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self ttl])
    {
        [result setValue:[self ttl] forKey:@"ttl"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self weight])
    {
        [result setValue:[self weight] forKey:@"weight"];
    }
    if([self viewValue])
    {
        [result setValue:[self viewValue] forKey:@"viewValue"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.domainName = [dictionary objectForKey:@"domainName"];
    self.hostRecord = [dictionary objectForKey:@"hostRecord"];
    self.hostValue = [dictionary objectForKey:@"hostValue"];
    self.jcloudRes = [dictionary objectForKey:@"jcloudRes"];
    self.mxPriority = [dictionary objectForKey:@"mxPriority"];
    self.port = [dictionary objectForKey:@"port"];
    self.ttl = [dictionary objectForKey:@"ttl"];
    self.type = [dictionary objectForKey:@"type"];
    self.weight = [dictionary objectForKey:@"weight"];
    self.viewValue = [dictionary objectForKey:@"viewValue"];
    return self;
}
 @end
@implementation Jdvpc
-(id) initWithIp:(NSString*) ip
      binded:(NSNumber*)binded { 
     self.ip = ip;               
     self.binded = binded;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    if([self binded])
    {
        [result setValue:[self binded] forKey:@"binded"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ip = [dictionary objectForKey:@"ip"];
    self.binded = [dictionary objectForKey:@"binded"];
    return self;
}
 @end
@implementation SubDomainExist
-(id) initWithDomain:(NSString*) domain
      isExist:(NSNumber*)isExist { 
     self.domain = domain;               
     self.isExist = isExist;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self domain])
    {
        [result setValue:[self domain] forKey:@"domain"];
    }
    if([self isExist])
    {
        [result setValue:[self isExist] forKey:@"isExist"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.domain = [dictionary objectForKey:@"domain"];
    self.isExist = [dictionary objectForKey:@"isExist"];
    return self;
}
 @end
@implementation SetRecords
-(id) initWithRecords:(NSArray<NSString*>*) records
      views:(NSArray<NSString*>*)views
      type:(NSString*)type { 
     self.records = records;               
     self.views = views;               
     self.type = type;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self records])
    {
        [result setValue:[self records] forKey:@"records"];
    }
    if([self views])
    {
        [result setValue:[self views] forKey:@"views"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.records = [dictionary objectForKey:@"records"];
    self.views = [dictionary objectForKey:@"views"];
    self.type = [dictionary objectForKey:@"type"];
    return self;
}
 @end
@implementation RRInfo
-(id) initWithCreator:(NSString*) creator
      viewName:(NSString*)viewName
      idValue:(NSNumber*)idValue
      hostRecord:(NSString*)hostRecord
      hostValue:(NSString*)hostValue
      jcloudRes:(NSNumber*)jcloudRes
      mxPriority:(NSNumber*)mxPriority
      port:(NSNumber*)port
      ttl:(NSNumber*)ttl
      type:(NSString*)type
      weight:(NSNumber*)weight
      viewValue:(NSArray<NSNumber*>*)viewValue
      resolvingStatus:(NSString*)resolvingStatus
      updateTime:(NSNumber*)updateTime { 
     self.creator = creator;               
     self.viewName = viewName;               
     self.idValue = idValue;               
     self.hostRecord = hostRecord;               
     self.hostValue = hostValue;               
     self.jcloudRes = jcloudRes;               
     self.mxPriority = mxPriority;               
     self.port = port;               
     self.ttl = ttl;               
     self.type = type;               
     self.weight = weight;               
     self.viewValue = viewValue;               
     self.resolvingStatus = resolvingStatus;               
     self.updateTime = updateTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self creator])
    {
        [result setValue:[self creator] forKey:@"creator"];
    }
    if([self viewName])
    {
        [result setValue:[self viewName] forKey:@"viewName"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self hostRecord])
    {
        [result setValue:[self hostRecord] forKey:@"hostRecord"];
    }
    if([self hostValue])
    {
        [result setValue:[self hostValue] forKey:@"hostValue"];
    }
    if([self jcloudRes])
    {
        [result setValue:[self jcloudRes] forKey:@"jcloudRes"];
    }
    if([self mxPriority])
    {
        [result setValue:[self mxPriority] forKey:@"mxPriority"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self ttl])
    {
        [result setValue:[self ttl] forKey:@"ttl"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self weight])
    {
        [result setValue:[self weight] forKey:@"weight"];
    }
    if([self viewValue])
    {
        [result setValue:[self viewValue] forKey:@"viewValue"];
    }
    if([self resolvingStatus])
    {
        [result setValue:[self resolvingStatus] forKey:@"resolvingStatus"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.creator = [dictionary objectForKey:@"creator"];
    self.viewName = [dictionary objectForKey:@"viewName"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.hostRecord = [dictionary objectForKey:@"hostRecord"];
    self.hostValue = [dictionary objectForKey:@"hostValue"];
    self.jcloudRes = [dictionary objectForKey:@"jcloudRes"];
    self.mxPriority = [dictionary objectForKey:@"mxPriority"];
    self.port = [dictionary objectForKey:@"port"];
    self.ttl = [dictionary objectForKey:@"ttl"];
    self.type = [dictionary objectForKey:@"type"];
    self.weight = [dictionary objectForKey:@"weight"];
    self.viewValue = [dictionary objectForKey:@"viewValue"];
    self.resolvingStatus = [dictionary objectForKey:@"resolvingStatus"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    return self;
}
 @end
@implementation Setlb
-(id) initWithId:(NSNumber*) idValue
      weight:(NSNumber*)weight { 
     self.idValue = idValue;               
     self.weight = weight;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self weight])
    {
        [result setValue:[self weight] forKey:@"weight"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.weight = [dictionary objectForKey:@"weight"];
    return self;
}
 @end
@implementation Records
-(id) initWithRecord:(NSString*) record
      weight:(NSNumber*)weight
      ttl:(NSNumber*)ttl
      prior:(NSNumber*)prior
      port:(NSNumber*)port { 
     self.record = record;               
     self.weight = weight;               
     self.ttl = ttl;               
     self.prior = prior;               
     self.port = port;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self record])
    {
        [result setValue:[self record] forKey:@"record"];
    }
    if([self weight])
    {
        [result setValue:[self weight] forKey:@"weight"];
    }
    if([self ttl])
    {
        [result setValue:[self ttl] forKey:@"ttl"];
    }
    if([self prior])
    {
        [result setValue:[self prior] forKey:@"prior"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.record = [dictionary objectForKey:@"record"];
    self.weight = [dictionary objectForKey:@"weight"];
    self.ttl = [dictionary objectForKey:@"ttl"];
    self.prior = [dictionary objectForKey:@"prior"];
    self.port = [dictionary objectForKey:@"port"];
    return self;
}
 @end
@implementation AddRR
-(id) initWithHostRecord:(NSString*) hostRecord
      hostValue:(NSString*)hostValue
      jcloudRes:(NSNumber*)jcloudRes
      mxPriority:(NSNumber*)mxPriority
      port:(NSNumber*)port
      ttl:(NSNumber*)ttl
      type:(NSString*)type
      weight:(NSNumber*)weight
      viewValue:(NSNumber*)viewValue { 
     self.hostRecord = hostRecord;               
     self.hostValue = hostValue;               
     self.jcloudRes = jcloudRes;               
     self.mxPriority = mxPriority;               
     self.port = port;               
     self.ttl = ttl;               
     self.type = type;               
     self.weight = weight;               
     self.viewValue = viewValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self hostRecord])
    {
        [result setValue:[self hostRecord] forKey:@"hostRecord"];
    }
    if([self hostValue])
    {
        [result setValue:[self hostValue] forKey:@"hostValue"];
    }
    if([self jcloudRes])
    {
        [result setValue:[self jcloudRes] forKey:@"jcloudRes"];
    }
    if([self mxPriority])
    {
        [result setValue:[self mxPriority] forKey:@"mxPriority"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self ttl])
    {
        [result setValue:[self ttl] forKey:@"ttl"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self weight])
    {
        [result setValue:[self weight] forKey:@"weight"];
    }
    if([self viewValue])
    {
        [result setValue:[self viewValue] forKey:@"viewValue"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.hostRecord = [dictionary objectForKey:@"hostRecord"];
    self.hostValue = [dictionary objectForKey:@"hostValue"];
    self.jcloudRes = [dictionary objectForKey:@"jcloudRes"];
    self.mxPriority = [dictionary objectForKey:@"mxPriority"];
    self.port = [dictionary objectForKey:@"port"];
    self.ttl = [dictionary objectForKey:@"ttl"];
    self.type = [dictionary objectForKey:@"type"];
    self.weight = [dictionary objectForKey:@"weight"];
    self.viewValue = [dictionary objectForKey:@"viewValue"];
    return self;
}
 @end
@implementation RR
-(id) initWithId:(NSNumber*) idValue
      hostRecord:(NSString*)hostRecord
      hostValue:(NSString*)hostValue
      jcloudRes:(NSNumber*)jcloudRes
      mxPriority:(NSNumber*)mxPriority
      port:(NSNumber*)port
      ttl:(NSNumber*)ttl
      type:(NSString*)type
      weight:(NSNumber*)weight
      viewValue:(NSArray<NSNumber*>*)viewValue { 
     self.idValue = idValue;               
     self.hostRecord = hostRecord;               
     self.hostValue = hostValue;               
     self.jcloudRes = jcloudRes;               
     self.mxPriority = mxPriority;               
     self.port = port;               
     self.ttl = ttl;               
     self.type = type;               
     self.weight = weight;               
     self.viewValue = viewValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self hostRecord])
    {
        [result setValue:[self hostRecord] forKey:@"hostRecord"];
    }
    if([self hostValue])
    {
        [result setValue:[self hostValue] forKey:@"hostValue"];
    }
    if([self jcloudRes])
    {
        [result setValue:[self jcloudRes] forKey:@"jcloudRes"];
    }
    if([self mxPriority])
    {
        [result setValue:[self mxPriority] forKey:@"mxPriority"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self ttl])
    {
        [result setValue:[self ttl] forKey:@"ttl"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self weight])
    {
        [result setValue:[self weight] forKey:@"weight"];
    }
    if([self viewValue])
    {
        [result setValue:[self viewValue] forKey:@"viewValue"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.hostRecord = [dictionary objectForKey:@"hostRecord"];
    self.hostValue = [dictionary objectForKey:@"hostValue"];
    self.jcloudRes = [dictionary objectForKey:@"jcloudRes"];
    self.mxPriority = [dictionary objectForKey:@"mxPriority"];
    self.port = [dictionary objectForKey:@"port"];
    self.ttl = [dictionary objectForKey:@"ttl"];
    self.type = [dictionary objectForKey:@"type"];
    self.weight = [dictionary objectForKey:@"weight"];
    self.viewValue = [dictionary objectForKey:@"viewValue"];
    return self;
}
 @end
@implementation BatchSetDNS
-(id) initWithHostRecord:(NSString*) hostRecord
      hostValue:(NSString*)hostValue
      idValue:(NSNumber*)idValue
      jcloudRes:(NSNumber*)jcloudRes
      mxPriority:(NSNumber*)mxPriority
      port:(NSNumber*)port
      ttl:(NSNumber*)ttl
      type:(NSString*)type
      weight:(NSNumber*)weight
      viewValue:(NSNumber*)viewValue { 
     self.hostRecord = hostRecord;               
     self.hostValue = hostValue;               
     self.idValue = idValue;               
     self.jcloudRes = jcloudRes;               
     self.mxPriority = mxPriority;               
     self.port = port;               
     self.ttl = ttl;               
     self.type = type;               
     self.weight = weight;               
     self.viewValue = viewValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self hostRecord])
    {
        [result setValue:[self hostRecord] forKey:@"hostRecord"];
    }
    if([self hostValue])
    {
        [result setValue:[self hostValue] forKey:@"hostValue"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self jcloudRes])
    {
        [result setValue:[self jcloudRes] forKey:@"jcloudRes"];
    }
    if([self mxPriority])
    {
        [result setValue:[self mxPriority] forKey:@"mxPriority"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self ttl])
    {
        [result setValue:[self ttl] forKey:@"ttl"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self weight])
    {
        [result setValue:[self weight] forKey:@"weight"];
    }
    if([self viewValue])
    {
        [result setValue:[self viewValue] forKey:@"viewValue"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.hostRecord = [dictionary objectForKey:@"hostRecord"];
    self.hostValue = [dictionary objectForKey:@"hostValue"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.jcloudRes = [dictionary objectForKey:@"jcloudRes"];
    self.mxPriority = [dictionary objectForKey:@"mxPriority"];
    self.port = [dictionary objectForKey:@"port"];
    self.ttl = [dictionary objectForKey:@"ttl"];
    self.type = [dictionary objectForKey:@"type"];
    self.weight = [dictionary objectForKey:@"weight"];
    self.viewValue = [dictionary objectForKey:@"viewValue"];
    return self;
}
 @end
@implementation HostRRlb
-(id) initWithHostValue:(NSString*) hostValue
      idValue:(NSNumber*)idValue
      weight:(NSNumber*)weight
      rate:(NSNumber*)rate { 
     self.hostValue = hostValue;               
     self.idValue = idValue;               
     self.weight = weight;               
     self.rate = rate;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self hostValue])
    {
        [result setValue:[self hostValue] forKey:@"hostValue"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self weight])
    {
        [result setValue:[self weight] forKey:@"weight"];
    }
    if([self rate])
    {
        [result setValue:[self rate] forKey:@"rate"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.hostValue = [dictionary objectForKey:@"hostValue"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.weight = [dictionary objectForKey:@"weight"];
    self.rate = [dictionary objectForKey:@"rate"];
    return self;
}
 @end
@implementation ImportDNS
-(id) initWithHostRecord:(NSString*) hostRecord
      hostValue:(NSString*)hostValue
      idValue:(NSNumber*)idValue
      jcloudRes:(NSNumber*)jcloudRes
      mxPriority:(NSNumber*)mxPriority
      port:(NSNumber*)port
      ttl:(NSNumber*)ttl
      type:(NSString*)type
      weight:(NSNumber*)weight
      viewValue:(NSNumber*)viewValue { 
     self.hostRecord = hostRecord;               
     self.hostValue = hostValue;               
     self.idValue = idValue;               
     self.jcloudRes = jcloudRes;               
     self.mxPriority = mxPriority;               
     self.port = port;               
     self.ttl = ttl;               
     self.type = type;               
     self.weight = weight;               
     self.viewValue = viewValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self hostRecord])
    {
        [result setValue:[self hostRecord] forKey:@"hostRecord"];
    }
    if([self hostValue])
    {
        [result setValue:[self hostValue] forKey:@"hostValue"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self jcloudRes])
    {
        [result setValue:[self jcloudRes] forKey:@"jcloudRes"];
    }
    if([self mxPriority])
    {
        [result setValue:[self mxPriority] forKey:@"mxPriority"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self ttl])
    {
        [result setValue:[self ttl] forKey:@"ttl"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self weight])
    {
        [result setValue:[self weight] forKey:@"weight"];
    }
    if([self viewValue])
    {
        [result setValue:[self viewValue] forKey:@"viewValue"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.hostRecord = [dictionary objectForKey:@"hostRecord"];
    self.hostValue = [dictionary objectForKey:@"hostValue"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.jcloudRes = [dictionary objectForKey:@"jcloudRes"];
    self.mxPriority = [dictionary objectForKey:@"mxPriority"];
    self.port = [dictionary objectForKey:@"port"];
    self.ttl = [dictionary objectForKey:@"ttl"];
    self.type = [dictionary objectForKey:@"type"];
    self.weight = [dictionary objectForKey:@"weight"];
    self.viewValue = [dictionary objectForKey:@"viewValue"];
    return self;
}
 @end
@implementation BackupAddressesInfo
-(id) initWithAddress:(NSString*) address
      type:(NSNumber*)type
      status:(NSNumber*)status { 
     self.address = address;               
     self.type = type;               
     self.status = status;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self address])
    {
        [result setValue:[self address] forKey:@"address"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.address = [dictionary objectForKey:@"address"];
    self.type = [dictionary objectForKey:@"type"];
    self.status = [dictionary objectForKey:@"status"];
    return self;
}
 @end
@implementation HttpHeader
-(id) initWithName:(NSString*) name
      value:(NSString*)value { 
     self.name = name;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation HttpResponseCodeRange
-(id) initWithStart:(NSNumber*) start
      end:(NSNumber*)end { 
     self.start = start;               
     self.end = end;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self start])
    {
        [result setValue:[self start] forKey:@"start"];
    }
    if([self end])
    {
        [result setValue:[self end] forKey:@"end"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.start = [dictionary objectForKey:@"start"];
    self.end = [dictionary objectForKey:@"end"];
    return self;
}
 @end
@implementation MonitorAlarmInfo
-(id) initWithDomainId:(NSNumber*) domainId
      subDomainName:(NSString*)subDomainName
      host:(NSString*)host
      idValue:(NSNumber*)idValue
      startTime:(NSNumber*)startTime
      endTime:(NSNumber*)endTime { 
     self.domainId = domainId;               
     self.subDomainName = subDomainName;               
     self.host = host;               
     self.idValue = idValue;               
     self.startTime = startTime;               
     self.endTime = endTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self domainId])
    {
        [result setValue:[self domainId] forKey:@"domainId"];
    }
    if([self subDomainName])
    {
        [result setValue:[self subDomainName] forKey:@"subDomainName"];
    }
    if([self host])
    {
        [result setValue:[self host] forKey:@"host"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.domainId = [dictionary objectForKey:@"domainId"];
    self.subDomainName = [dictionary objectForKey:@"subDomainName"];
    self.host = [dictionary objectForKey:@"host"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    return self;
}
 @end
@implementation DomainAdded
-(id) initWithId:(NSNumber*) idValue
      domainName:(NSString*)domainName
      createTime:(NSNumber*)createTime
      expirationDate:(NSNumber*)expirationDate
      packId:(NSNumber*)packId { 
     self.idValue = idValue;               
     self.domainName = domainName;               
     self.createTime = createTime;               
     self.expirationDate = expirationDate;               
     self.packId = packId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self domainName])
    {
        [result setValue:[self domainName] forKey:@"domainName"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self expirationDate])
    {
        [result setValue:[self expirationDate] forKey:@"expirationDate"];
    }
    if([self packId])
    {
        [result setValue:[self packId] forKey:@"packId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.domainName = [dictionary objectForKey:@"domainName"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.expirationDate = [dictionary objectForKey:@"expirationDate"];
    self.packId = [dictionary objectForKey:@"packId"];
    return self;
}
 @end
@implementation DomainInfo
-(id) initWithId:(NSNumber*) idValue
      domainName:(NSString*)domainName
      createTime:(NSNumber*)createTime
      expirationDate:(NSNumber*)expirationDate
      packId:(NSNumber*)packId
      packName:(NSString*)packName
      resolvingStatus:(NSString*)resolvingStatus
      creator:(NSString*)creator
      jcloudNs:(NSNumber*)jcloudNs
      lockStatus:(NSNumber*)lockStatus
      probeNsList:(NSArray<NSString*>*)probeNsList
      defNsList:(NSArray<NSString*>*)defNsList { 
     self.idValue = idValue;               
     self.domainName = domainName;               
     self.createTime = createTime;               
     self.expirationDate = expirationDate;               
     self.packId = packId;               
     self.packName = packName;               
     self.resolvingStatus = resolvingStatus;               
     self.creator = creator;               
     self.jcloudNs = jcloudNs;               
     self.lockStatus = lockStatus;               
     self.probeNsList = probeNsList;               
     self.defNsList = defNsList;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self domainName])
    {
        [result setValue:[self domainName] forKey:@"domainName"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self expirationDate])
    {
        [result setValue:[self expirationDate] forKey:@"expirationDate"];
    }
    if([self packId])
    {
        [result setValue:[self packId] forKey:@"packId"];
    }
    if([self packName])
    {
        [result setValue:[self packName] forKey:@"packName"];
    }
    if([self resolvingStatus])
    {
        [result setValue:[self resolvingStatus] forKey:@"resolvingStatus"];
    }
    if([self creator])
    {
        [result setValue:[self creator] forKey:@"creator"];
    }
    if([self jcloudNs])
    {
        [result setValue:[self jcloudNs] forKey:@"jcloudNs"];
    }
    if([self lockStatus])
    {
        [result setValue:[self lockStatus] forKey:@"lockStatus"];
    }
    if([self probeNsList])
    {
        [result setValue:[self probeNsList] forKey:@"probeNsList"];
    }
    if([self defNsList])
    {
        [result setValue:[self defNsList] forKey:@"defNsList"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.domainName = [dictionary objectForKey:@"domainName"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.expirationDate = [dictionary objectForKey:@"expirationDate"];
    self.packId = [dictionary objectForKey:@"packId"];
    self.packName = [dictionary objectForKey:@"packName"];
    self.resolvingStatus = [dictionary objectForKey:@"resolvingStatus"];
    self.creator = [dictionary objectForKey:@"creator"];
    self.jcloudNs = [dictionary objectForKey:@"jcloudNs"];
    self.lockStatus = [dictionary objectForKey:@"lockStatus"];
    self.probeNsList = [dictionary objectForKey:@"probeNsList"];
    self.defNsList = [dictionary objectForKey:@"defNsList"];
    return self;
}
 @end
@implementation Notice
-(id) initWithId:(NSNumber*) idValue
      title:(NSString*)title
      url:(NSString*)url { 
     self.idValue = idValue;               
     self.title = title;               
     self.url = url;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self title])
    {
        [result setValue:[self title] forKey:@"title"];
    }
    if([self url])
    {
        [result setValue:[self url] forKey:@"url"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.title = [dictionary objectForKey:@"title"];
    self.url = [dictionary objectForKey:@"url"];
    return self;
}
 @end
@implementation ResourceInfo
-(id) initWithResourceId:(NSString*) resourceId
      resourceName:(NSString*)resourceName
      remark:(NSString*)remark { 
     self.resourceId = resourceId;               
     self.resourceName = resourceName;               
     self.remark = remark;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self resourceName])
    {
        [result setValue:[self resourceName] forKey:@"resourceName"];
    }
    if([self remark])
    {
        [result setValue:[self remark] forKey:@"remark"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.resourceName = [dictionary objectForKey:@"resourceName"];
    self.remark = [dictionary objectForKey:@"remark"];
    return self;
}
 @end
@implementation ResourceRemarkInfo
-(id) initWithDuration:(NSString*) duration
      packType:(NSString*)packType { 
     self.duration = duration;               
     self.packType = packType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self duration])
    {
        [result setValue:[self duration] forKey:@"duration"];
    }
    if([self packType])
    {
        [result setValue:[self packType] forKey:@"packType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.duration = [dictionary objectForKey:@"duration"];
    self.packType = [dictionary objectForKey:@"packType"];
    return self;
}
 @end
@implementation A
-(id) initWithCode:(NSNumber*) code
      message:(NSString*)message { 
     self.code = code;               
     self.message = message;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.code = [dictionary objectForKey:@"code"];
    self.message = [dictionary objectForKey:@"message"];
    return self;
}
 @end
@implementation NS
-(id) initWithTag:(NSNumber*) tag
      server:(NSString*)server { 
     self.tag = tag;               
     self.server = server;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self tag])
    {
        [result setValue:[self tag] forKey:@"tag"];
    }
    if([self server])
    {
        [result setValue:[self server] forKey:@"server"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.tag = [dictionary objectForKey:@"tag"];
    self.server = [dictionary objectForKey:@"server"];
    return self;
}
 @end
@implementation Result
-(id) initWithCode:(NSNumber*) code
      detail:(NSString*)detail { 
     self.code = code;               
     self.detail = detail;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self detail])
    {
        [result setValue:[self detail] forKey:@"detail"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.code = [dictionary objectForKey:@"code"];
    self.detail = [dictionary objectForKey:@"detail"];
    return self;
}
 @end
@implementation AddView
-(id) initWithDomainName:(NSString*) domainName
      viewName:(NSString*)viewName
      ipRanges:(NSArray<NSString*>*)ipRanges { 
     self.domainName = domainName;               
     self.viewName = viewName;               
     self.ipRanges = ipRanges;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self domainName])
    {
        [result setValue:[self domainName] forKey:@"domainName"];
    }
    if([self viewName])
    {
        [result setValue:[self viewName] forKey:@"viewName"];
    }
    if([self ipRanges])
    {
        [result setValue:[self ipRanges] forKey:@"ipRanges"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.domainName = [dictionary objectForKey:@"domainName"];
    self.viewName = [dictionary objectForKey:@"viewName"];
    self.ipRanges = [dictionary objectForKey:@"ipRanges"];
    return self;
}
 @end
@implementation DelView
-(id) initWithDomainName:(NSString*) domainName
      viewName:(NSString*)viewName
      viewId:(NSNumber*)viewId { 
     self.domainName = domainName;               
     self.viewName = viewName;               
     self.viewId = viewId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self domainName])
    {
        [result setValue:[self domainName] forKey:@"domainName"];
    }
    if([self viewName])
    {
        [result setValue:[self viewName] forKey:@"viewName"];
    }
    if([self viewId])
    {
        [result setValue:[self viewId] forKey:@"viewId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.domainName = [dictionary objectForKey:@"domainName"];
    self.viewName = [dictionary objectForKey:@"viewName"];
    self.viewId = [dictionary objectForKey:@"viewId"];
    return self;
}
 @end
@implementation AddViewIP
-(id) initWithViewId:(NSNumber*) viewId
      viewName:(NSString*)viewName
      ipRanges:(NSArray<NSString*>*)ipRanges { 
     self.viewId = viewId;               
     self.viewName = viewName;               
     self.ipRanges = ipRanges;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self viewId])
    {
        [result setValue:[self viewId] forKey:@"viewId"];
    }
    if([self viewName])
    {
        [result setValue:[self viewName] forKey:@"viewName"];
    }
    if([self ipRanges])
    {
        [result setValue:[self ipRanges] forKey:@"ipRanges"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.viewId = [dictionary objectForKey:@"viewId"];
    self.viewName = [dictionary objectForKey:@"viewName"];
    self.ipRanges = [dictionary objectForKey:@"ipRanges"];
    return self;
}
 @end
@implementation UserViewInput
-(id) initWithViewId:(NSNumber*) viewId
      viewName:(NSString*)viewName
      domainId:(NSNumber*)domainId
      ipRanges:(NSArray<NSString*>*)ipRanges
      isDelete:(NSNumber*)isDelete
      creator:(NSString*)creator
      createTime:(NSNumber*)createTime
      updator:(NSString*)updator
      updateTime:(NSNumber*)updateTime { 
     self.viewId = viewId;               
     self.viewName = viewName;               
     self.domainId = domainId;               
     self.ipRanges = ipRanges;               
     self.isDelete = isDelete;               
     self.creator = creator;               
     self.createTime = createTime;               
     self.updator = updator;               
     self.updateTime = updateTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self viewId])
    {
        [result setValue:[self viewId] forKey:@"viewId"];
    }
    if([self viewName])
    {
        [result setValue:[self viewName] forKey:@"viewName"];
    }
    if([self domainId])
    {
        [result setValue:[self domainId] forKey:@"domainId"];
    }
    if([self ipRanges])
    {
        [result setValue:[self ipRanges] forKey:@"ipRanges"];
    }
    if([self isDelete])
    {
        [result setValue:[self isDelete] forKey:@"isDelete"];
    }
    if([self creator])
    {
        [result setValue:[self creator] forKey:@"creator"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self updator])
    {
        [result setValue:[self updator] forKey:@"updator"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.viewId = [dictionary objectForKey:@"viewId"];
    self.viewName = [dictionary objectForKey:@"viewName"];
    self.domainId = [dictionary objectForKey:@"domainId"];
    self.ipRanges = [dictionary objectForKey:@"ipRanges"];
    self.isDelete = [dictionary objectForKey:@"isDelete"];
    self.creator = [dictionary objectForKey:@"creator"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.updator = [dictionary objectForKey:@"updator"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    return self;
}
 @end
@implementation Userview
-(id) initWithViewId:(NSNumber*) viewId
      viewName:(NSString*)viewName
      domainId:(NSNumber*)domainId
      domainName:(NSString*)domainName
      isDelete:(NSNumber*)isDelete
      creator:(NSString*)creator
      createTime:(NSNumber*)createTime
      updator:(NSString*)updator
      updateTime:(NSNumber*)updateTime { 
     self.viewId = viewId;               
     self.viewName = viewName;               
     self.domainId = domainId;               
     self.domainName = domainName;               
     self.isDelete = isDelete;               
     self.creator = creator;               
     self.createTime = createTime;               
     self.updator = updator;               
     self.updateTime = updateTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self viewId])
    {
        [result setValue:[self viewId] forKey:@"viewId"];
    }
    if([self viewName])
    {
        [result setValue:[self viewName] forKey:@"viewName"];
    }
    if([self domainId])
    {
        [result setValue:[self domainId] forKey:@"domainId"];
    }
    if([self domainName])
    {
        [result setValue:[self domainName] forKey:@"domainName"];
    }
    if([self isDelete])
    {
        [result setValue:[self isDelete] forKey:@"isDelete"];
    }
    if([self creator])
    {
        [result setValue:[self creator] forKey:@"creator"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self updator])
    {
        [result setValue:[self updator] forKey:@"updator"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.viewId = [dictionary objectForKey:@"viewId"];
    self.viewName = [dictionary objectForKey:@"viewName"];
    self.domainId = [dictionary objectForKey:@"domainId"];
    self.domainName = [dictionary objectForKey:@"domainName"];
    self.isDelete = [dictionary objectForKey:@"isDelete"];
    self.creator = [dictionary objectForKey:@"creator"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.updator = [dictionary objectForKey:@"updator"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    return self;
}
 @end
@implementation DelViewIP
-(id) initWithViewId:(NSNumber*) viewId
      viewName:(NSString*)viewName
      ipRanges:(NSArray<NSString*>*)ipRanges { 
     self.viewId = viewId;               
     self.viewName = viewName;               
     self.ipRanges = ipRanges;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self viewId])
    {
        [result setValue:[self viewId] forKey:@"viewId"];
    }
    if([self viewName])
    {
        [result setValue:[self viewName] forKey:@"viewName"];
    }
    if([self ipRanges])
    {
        [result setValue:[self ipRanges] forKey:@"ipRanges"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.viewId = [dictionary objectForKey:@"viewId"];
    self.viewName = [dictionary objectForKey:@"viewName"];
    self.ipRanges = [dictionary objectForKey:@"ipRanges"];
    return self;
}
 @end
@implementation Actionlog
-(id) initWithId:(NSNumber*) idValue
      userPin:(NSString*)userPin
      domain:(NSString*)domain
      type:(NSNumber*)type
      detail:(NSString*)detail
      time:(NSNumber*)time
      success:(NSNumber*)success
      failReason:(NSString*)failReason
      clientIp:(NSString*)clientIp { 
     self.idValue = idValue;               
     self.userPin = userPin;               
     self.domain = domain;               
     self.type = type;               
     self.detail = detail;               
     self.time = time;               
     self.success = success;               
     self.failReason = failReason;               
     self.clientIp = clientIp;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self userPin])
    {
        [result setValue:[self userPin] forKey:@"userPin"];
    }
    if([self domain])
    {
        [result setValue:[self domain] forKey:@"domain"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self detail])
    {
        [result setValue:[self detail] forKey:@"detail"];
    }
    if([self time])
    {
        [result setValue:[self time] forKey:@"time"];
    }
    if([self success])
    {
        [result setValue:[self success] forKey:@"success"];
    }
    if([self failReason])
    {
        [result setValue:[self failReason] forKey:@"failReason"];
    }
    if([self clientIp])
    {
        [result setValue:[self clientIp] forKey:@"clientIp"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.userPin = [dictionary objectForKey:@"userPin"];
    self.domain = [dictionary objectForKey:@"domain"];
    self.type = [dictionary objectForKey:@"type"];
    self.detail = [dictionary objectForKey:@"detail"];
    self.time = [dictionary objectForKey:@"time"];
    self.success = [dictionary objectForKey:@"success"];
    self.failReason = [dictionary objectForKey:@"failReason"];
    self.clientIp = [dictionary objectForKey:@"clientIp"];
    return self;
}
 @end
@implementation Getlb
-(id) initWithBalance:(NSNumber*) balance
      record:(NSString*)record
      type:(NSString*)type
      viewName:(NSString*)viewName
      viewValue:(NSNumber*)viewValue
      items:(NSArray<HostRRlb*>*)items { 
     self.balance = balance;               
     self.record = record;               
     self.type = type;               
     self.viewName = viewName;               
     self.viewValue = viewValue;               
     self.items = items;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self balance])
    {
        [result setValue:[self balance] forKey:@"balance"];
    }
    if([self record])
    {
        [result setValue:[self record] forKey:@"record"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self viewName])
    {
        [result setValue:[self viewName] forKey:@"viewName"];
    }
    if([self viewValue])
    {
        [result setValue:[self viewValue] forKey:@"viewValue"];
    }
    if([self items])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self items] count]; i++) {
            HostRRlb* item = [[self items] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"items"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.balance = [dictionary objectForKey:@"balance"];
    self.record = [dictionary objectForKey:@"record"];
    self.type = [dictionary objectForKey:@"type"];
    self.viewName = [dictionary objectForKey:@"viewName"];
    self.viewValue = [dictionary objectForKey:@"viewValue"];
    NSArray* itemsArray = [dictionary objectForKey:@"items"];
    if(itemsArray&&![itemsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [itemsArray count];i++)
        {
            HostRRlb* item = [[HostRRlb alloc]initWithDic:[itemsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.items = propertyArray;
    }
    return self;
}
 @end
@implementation SetRR
-(id) initWithDomain:(NSString*) domain
      data:(NSArray<SetRecords*>*)data { 
     self.domain = domain;               
     self.data = data;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self domain])
    {
        [result setValue:[self domain] forKey:@"domain"];
    }
    if([self data])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self data] count]; i++) {
            SetRecords* item = [[self data] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.domain = [dictionary objectForKey:@"domain"];
    NSArray* dataArray = [dictionary objectForKey:@"data"];
    if(dataArray&&![dataArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataArray count];i++)
        {
            SetRecords* item = [[SetRecords alloc]initWithDic:[dataArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.data = propertyArray;
    }
    return self;
}
 @end
@implementation ViewTree
-(id) initWithDisabled:(NSNumber*) disabled
      label:(NSString*)label
      leaf:(NSNumber*)leaf
      value:(NSNumber*)value
      viewName:(NSString*)viewName
      children:(NSArray<ViewTree*>*)children { 
     self.disabled = disabled;               
     self.label = label;               
     self.leaf = leaf;               
     self.value = value;               
     self.viewName = viewName;               
     self.children = children;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self disabled])
    {
        [result setValue:[self disabled] forKey:@"disabled"];
    }
    if([self label])
    {
        [result setValue:[self label] forKey:@"label"];
    }
    if([self leaf])
    {
        [result setValue:[self leaf] forKey:@"leaf"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    if([self viewName])
    {
        [result setValue:[self viewName] forKey:@"viewName"];
    }
    if([self children])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self children] count]; i++) {
            ViewTree* item = [[self children] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"children"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.disabled = [dictionary objectForKey:@"disabled"];
    self.label = [dictionary objectForKey:@"label"];
    self.leaf = [dictionary objectForKey:@"leaf"];
    self.value = [dictionary objectForKey:@"value"];
    self.viewName = [dictionary objectForKey:@"viewName"];
    NSArray* childrenArray = [dictionary objectForKey:@"children"];
    if(childrenArray&&![childrenArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [childrenArray count];i++)
        {
            ViewTree* item = [[ViewTree alloc]initWithDic:[childrenArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.children = propertyArray;
    }
    return self;
}
 @end
@implementation RecordsReqs
-(id) initWithRecords:(NSArray<Records*>*) records
      views:(NSArray<NSString*>*)views
      type:(NSString*)type { 
     self.records = records;               
     self.views = views;               
     self.type = type;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self records])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self records] count]; i++) {
            Records* item = [[self records] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"records"];
    }
    if([self views])
    {
        [result setValue:[self views] forKey:@"views"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* recordsArray = [dictionary objectForKey:@"records"];
    if(recordsArray&&![recordsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [recordsArray count];i++)
        {
            Records* item = [[Records alloc]initWithDic:[recordsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.records = propertyArray;
    }
    self.views = [dictionary objectForKey:@"views"];
    self.type = [dictionary objectForKey:@"type"];
    return self;
}
 @end
@implementation ResourceRecordSetReqs
-(id) initWithDomain:(NSString*) domain
      data:(NSArray<RecordsReqs*>*)data { 
     self.domain = domain;               
     self.data = data;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self domain])
    {
        [result setValue:[self domain] forKey:@"domain"];
    }
    if([self data])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self data] count]; i++) {
            RecordsReqs* item = [[self data] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.domain = [dictionary objectForKey:@"domain"];
    NSArray* dataArray = [dictionary objectForKey:@"data"];
    if(dataArray&&![dataArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataArray count];i++)
        {
            RecordsReqs* item = [[RecordsReqs alloc]initWithDic:[dataArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.data = propertyArray;
    }
    return self;
}
 @end
@implementation Monitor
-(id) initWithAlarmLimit:(NSNumber*) alarmLimit
      canRecover:(NSNumber*)canRecover
      canSwitch:(NSNumber*)canSwitch
      clusters:(NSString*)clusters
      domainName:(NSString*)domainName
      hostStatus:(NSNumber*)hostStatus
      hostValue:(NSString*)hostValue
      idValue:(NSNumber*)idValue
      ipBackup01:(NSString*)ipBackup01
      ipBackup01Status:(NSNumber*)ipBackup01Status
      ipBackup01Type:(NSNumber*)ipBackup01Type
      ipBackup02:(NSString*)ipBackup02
      ipBackup02Status:(NSNumber*)ipBackup02Status
      ipBackup02Type:(NSNumber*)ipBackup02Type
      manualBackup:(NSString*)manualBackup
      manualBackupStatus:(NSNumber*)manualBackupStatus
      manualBackupType:(NSNumber*)manualBackupType
      monitorEnable:(NSNumber*)monitorEnable
      monitorFreq:(NSNumber*)monitorFreq
      monitorPort:(NSNumber*)monitorPort
      monitorRule:(NSNumber*)monitorRule
      monitorUri:(NSString*)monitorUri
      notifyEmail:(NSString*)notifyEmail
      notifyEmailEnable:(NSNumber*)notifyEmailEnable
      notifyMsgBarEnable:(NSNumber*)notifyMsgBarEnable
      notifySms:(NSString*)notifySms
      notifySmsEnable:(NSNumber*)notifySmsEnable
      protocol:(NSNumber*)protocol
      stopRecoverRule:(NSNumber*)stopRecoverRule
      subDomainName:(NSString*)subDomainName
      switchRecoverRule:(NSNumber*)switchRecoverRule
      type:(NSNumber*)type
      usedType:(NSNumber*)usedType
      backupAddressList:(NSArray<BackupAddressesInfo*>*)backupAddressList
      requestHeaders:(NSArray<HttpHeader*>*)requestHeaders
      responseBodyMatch:(NSString*)responseBodyMatch
      responseCodeRanges:(NSArray<HttpResponseCodeRange*>*)responseCodeRanges
      effectAddr:(NSString*)effectAddr { 
     self.alarmLimit = alarmLimit;               
     self.canRecover = canRecover;               
     self.canSwitch = canSwitch;               
     self.clusters = clusters;               
     self.domainName = domainName;               
     self.hostStatus = hostStatus;               
     self.hostValue = hostValue;               
     self.idValue = idValue;               
     self.ipBackup01 = ipBackup01;               
     self.ipBackup01Status = ipBackup01Status;               
     self.ipBackup01Type = ipBackup01Type;               
     self.ipBackup02 = ipBackup02;               
     self.ipBackup02Status = ipBackup02Status;               
     self.ipBackup02Type = ipBackup02Type;               
     self.manualBackup = manualBackup;               
     self.manualBackupStatus = manualBackupStatus;               
     self.manualBackupType = manualBackupType;               
     self.monitorEnable = monitorEnable;               
     self.monitorFreq = monitorFreq;               
     self.monitorPort = monitorPort;               
     self.monitorRule = monitorRule;               
     self.monitorUri = monitorUri;               
     self.notifyEmail = notifyEmail;               
     self.notifyEmailEnable = notifyEmailEnable;               
     self.notifyMsgBarEnable = notifyMsgBarEnable;               
     self.notifySms = notifySms;               
     self.notifySmsEnable = notifySmsEnable;               
     self.protocol = protocol;               
     self.stopRecoverRule = stopRecoverRule;               
     self.subDomainName = subDomainName;               
     self.switchRecoverRule = switchRecoverRule;               
     self.type = type;               
     self.usedType = usedType;               
     self.backupAddressList = backupAddressList;               
     self.requestHeaders = requestHeaders;               
     self.responseBodyMatch = responseBodyMatch;               
     self.responseCodeRanges = responseCodeRanges;               
     self.effectAddr = effectAddr;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self alarmLimit])
    {
        [result setValue:[self alarmLimit] forKey:@"alarmLimit"];
    }
    if([self canRecover])
    {
        [result setValue:[self canRecover] forKey:@"canRecover"];
    }
    if([self canSwitch])
    {
        [result setValue:[self canSwitch] forKey:@"canSwitch"];
    }
    if([self clusters])
    {
        [result setValue:[self clusters] forKey:@"clusters"];
    }
    if([self domainName])
    {
        [result setValue:[self domainName] forKey:@"domainName"];
    }
    if([self hostStatus])
    {
        [result setValue:[self hostStatus] forKey:@"hostStatus"];
    }
    if([self hostValue])
    {
        [result setValue:[self hostValue] forKey:@"hostValue"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self ipBackup01])
    {
        [result setValue:[self ipBackup01] forKey:@"ipBackup01"];
    }
    if([self ipBackup01Status])
    {
        [result setValue:[self ipBackup01Status] forKey:@"ipBackup01Status"];
    }
    if([self ipBackup01Type])
    {
        [result setValue:[self ipBackup01Type] forKey:@"ipBackup01Type"];
    }
    if([self ipBackup02])
    {
        [result setValue:[self ipBackup02] forKey:@"ipBackup02"];
    }
    if([self ipBackup02Status])
    {
        [result setValue:[self ipBackup02Status] forKey:@"ipBackup02Status"];
    }
    if([self ipBackup02Type])
    {
        [result setValue:[self ipBackup02Type] forKey:@"ipBackup02Type"];
    }
    if([self manualBackup])
    {
        [result setValue:[self manualBackup] forKey:@"manualBackup"];
    }
    if([self manualBackupStatus])
    {
        [result setValue:[self manualBackupStatus] forKey:@"manualBackupStatus"];
    }
    if([self manualBackupType])
    {
        [result setValue:[self manualBackupType] forKey:@"manualBackupType"];
    }
    if([self monitorEnable])
    {
        [result setValue:[self monitorEnable] forKey:@"monitorEnable"];
    }
    if([self monitorFreq])
    {
        [result setValue:[self monitorFreq] forKey:@"monitorFreq"];
    }
    if([self monitorPort])
    {
        [result setValue:[self monitorPort] forKey:@"monitorPort"];
    }
    if([self monitorRule])
    {
        [result setValue:[self monitorRule] forKey:@"monitorRule"];
    }
    if([self monitorUri])
    {
        [result setValue:[self monitorUri] forKey:@"monitorUri"];
    }
    if([self notifyEmail])
    {
        [result setValue:[self notifyEmail] forKey:@"notifyEmail"];
    }
    if([self notifyEmailEnable])
    {
        [result setValue:[self notifyEmailEnable] forKey:@"notifyEmailEnable"];
    }
    if([self notifyMsgBarEnable])
    {
        [result setValue:[self notifyMsgBarEnable] forKey:@"notifyMsgBarEnable"];
    }
    if([self notifySms])
    {
        [result setValue:[self notifySms] forKey:@"notifySms"];
    }
    if([self notifySmsEnable])
    {
        [result setValue:[self notifySmsEnable] forKey:@"notifySmsEnable"];
    }
    if([self protocol])
    {
        [result setValue:[self protocol] forKey:@"protocol"];
    }
    if([self stopRecoverRule])
    {
        [result setValue:[self stopRecoverRule] forKey:@"stopRecoverRule"];
    }
    if([self subDomainName])
    {
        [result setValue:[self subDomainName] forKey:@"subDomainName"];
    }
    if([self switchRecoverRule])
    {
        [result setValue:[self switchRecoverRule] forKey:@"switchRecoverRule"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self usedType])
    {
        [result setValue:[self usedType] forKey:@"usedType"];
    }
    if([self backupAddressList])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self backupAddressList] count]; i++) {
            BackupAddressesInfo* item = [[self backupAddressList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"backupAddressList"];
    }
    if([self requestHeaders])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self requestHeaders] count]; i++) {
            HttpHeader* item = [[self requestHeaders] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"requestHeaders"];
    }
    if([self responseBodyMatch])
    {
        [result setValue:[self responseBodyMatch] forKey:@"responseBodyMatch"];
    }
    if([self responseCodeRanges])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self responseCodeRanges] count]; i++) {
            HttpResponseCodeRange* item = [[self responseCodeRanges] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"responseCodeRanges"];
    }
    if([self effectAddr])
    {
        [result setValue:[self effectAddr] forKey:@"effectAddr"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.alarmLimit = [dictionary objectForKey:@"alarmLimit"];
    self.canRecover = [dictionary objectForKey:@"canRecover"];
    self.canSwitch = [dictionary objectForKey:@"canSwitch"];
    self.clusters = [dictionary objectForKey:@"clusters"];
    self.domainName = [dictionary objectForKey:@"domainName"];
    self.hostStatus = [dictionary objectForKey:@"hostStatus"];
    self.hostValue = [dictionary objectForKey:@"hostValue"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.ipBackup01 = [dictionary objectForKey:@"ipBackup01"];
    self.ipBackup01Status = [dictionary objectForKey:@"ipBackup01Status"];
    self.ipBackup01Type = [dictionary objectForKey:@"ipBackup01Type"];
    self.ipBackup02 = [dictionary objectForKey:@"ipBackup02"];
    self.ipBackup02Status = [dictionary objectForKey:@"ipBackup02Status"];
    self.ipBackup02Type = [dictionary objectForKey:@"ipBackup02Type"];
    self.manualBackup = [dictionary objectForKey:@"manualBackup"];
    self.manualBackupStatus = [dictionary objectForKey:@"manualBackupStatus"];
    self.manualBackupType = [dictionary objectForKey:@"manualBackupType"];
    self.monitorEnable = [dictionary objectForKey:@"monitorEnable"];
    self.monitorFreq = [dictionary objectForKey:@"monitorFreq"];
    self.monitorPort = [dictionary objectForKey:@"monitorPort"];
    self.monitorRule = [dictionary objectForKey:@"monitorRule"];
    self.monitorUri = [dictionary objectForKey:@"monitorUri"];
    self.notifyEmail = [dictionary objectForKey:@"notifyEmail"];
    self.notifyEmailEnable = [dictionary objectForKey:@"notifyEmailEnable"];
    self.notifyMsgBarEnable = [dictionary objectForKey:@"notifyMsgBarEnable"];
    self.notifySms = [dictionary objectForKey:@"notifySms"];
    self.notifySmsEnable = [dictionary objectForKey:@"notifySmsEnable"];
    self.protocol = [dictionary objectForKey:@"protocol"];
    self.stopRecoverRule = [dictionary objectForKey:@"stopRecoverRule"];
    self.subDomainName = [dictionary objectForKey:@"subDomainName"];
    self.switchRecoverRule = [dictionary objectForKey:@"switchRecoverRule"];
    self.type = [dictionary objectForKey:@"type"];
    self.usedType = [dictionary objectForKey:@"usedType"];
    NSArray* backupAddressListArray = [dictionary objectForKey:@"backupAddressList"];
    if(backupAddressListArray&&![backupAddressListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [backupAddressListArray count];i++)
        {
            BackupAddressesInfo* item = [[BackupAddressesInfo alloc]initWithDic:[backupAddressListArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.backupAddressList = propertyArray;
    }
    NSArray* requestHeadersArray = [dictionary objectForKey:@"requestHeaders"];
    if(requestHeadersArray&&![requestHeadersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [requestHeadersArray count];i++)
        {
            HttpHeader* item = [[HttpHeader alloc]initWithDic:[requestHeadersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.requestHeaders = propertyArray;
    }
    self.responseBodyMatch = [dictionary objectForKey:@"responseBodyMatch"];
    NSArray* responseCodeRangesArray = [dictionary objectForKey:@"responseCodeRanges"];
    if(responseCodeRangesArray&&![responseCodeRangesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [responseCodeRangesArray count];i++)
        {
            HttpResponseCodeRange* item = [[HttpResponseCodeRange alloc]initWithDic:[responseCodeRangesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.responseCodeRanges = propertyArray;
    }
    self.effectAddr = [dictionary objectForKey:@"effectAddr"];
    return self;
}
 @end
@implementation UpdateMonitor
-(id) initWithAlarmLimit:(NSNumber*) alarmLimit
      idValue:(NSNumber*)idValue
      ipBackup01:(NSString*)ipBackup01
      ipBackup02:(NSString*)ipBackup02
      backupAddressList:(NSArray<NSString*>*)backupAddressList
      monitorEnable:(NSNumber*)monitorEnable
      monitorFreq:(NSNumber*)monitorFreq
      monitorPort:(NSNumber*)monitorPort
      monitorRule:(NSNumber*)monitorRule
      monitorUri:(NSString*)monitorUri
      notifyEmailEnable:(NSNumber*)notifyEmailEnable
      notifyMsgBarEnable:(NSNumber*)notifyMsgBarEnable
      notifySmsEnable:(NSNumber*)notifySmsEnable
      protocol:(NSNumber*)protocol
      stopRecoverRule:(NSNumber*)stopRecoverRule
      switchRecoverRule:(NSNumber*)switchRecoverRule
      requestHeaders:(NSArray<HttpHeader*>*)requestHeaders
      responseBodyMatch:(NSString*)responseBodyMatch
      responseCodeRanges:(NSArray<HttpResponseCodeRange*>*)responseCodeRanges { 
     self.alarmLimit = alarmLimit;               
     self.idValue = idValue;               
     self.ipBackup01 = ipBackup01;               
     self.ipBackup02 = ipBackup02;               
     self.backupAddressList = backupAddressList;               
     self.monitorEnable = monitorEnable;               
     self.monitorFreq = monitorFreq;               
     self.monitorPort = monitorPort;               
     self.monitorRule = monitorRule;               
     self.monitorUri = monitorUri;               
     self.notifyEmailEnable = notifyEmailEnable;               
     self.notifyMsgBarEnable = notifyMsgBarEnable;               
     self.notifySmsEnable = notifySmsEnable;               
     self.protocol = protocol;               
     self.stopRecoverRule = stopRecoverRule;               
     self.switchRecoverRule = switchRecoverRule;               
     self.requestHeaders = requestHeaders;               
     self.responseBodyMatch = responseBodyMatch;               
     self.responseCodeRanges = responseCodeRanges;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self alarmLimit])
    {
        [result setValue:[self alarmLimit] forKey:@"alarmLimit"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self ipBackup01])
    {
        [result setValue:[self ipBackup01] forKey:@"ipBackup01"];
    }
    if([self ipBackup02])
    {
        [result setValue:[self ipBackup02] forKey:@"ipBackup02"];
    }
    if([self backupAddressList])
    {
        [result setValue:[self backupAddressList] forKey:@"backupAddressList"];
    }
    if([self monitorEnable])
    {
        [result setValue:[self monitorEnable] forKey:@"monitorEnable"];
    }
    if([self monitorFreq])
    {
        [result setValue:[self monitorFreq] forKey:@"monitorFreq"];
    }
    if([self monitorPort])
    {
        [result setValue:[self monitorPort] forKey:@"monitorPort"];
    }
    if([self monitorRule])
    {
        [result setValue:[self monitorRule] forKey:@"monitorRule"];
    }
    if([self monitorUri])
    {
        [result setValue:[self monitorUri] forKey:@"monitorUri"];
    }
    if([self notifyEmailEnable])
    {
        [result setValue:[self notifyEmailEnable] forKey:@"notifyEmailEnable"];
    }
    if([self notifyMsgBarEnable])
    {
        [result setValue:[self notifyMsgBarEnable] forKey:@"notifyMsgBarEnable"];
    }
    if([self notifySmsEnable])
    {
        [result setValue:[self notifySmsEnable] forKey:@"notifySmsEnable"];
    }
    if([self protocol])
    {
        [result setValue:[self protocol] forKey:@"protocol"];
    }
    if([self stopRecoverRule])
    {
        [result setValue:[self stopRecoverRule] forKey:@"stopRecoverRule"];
    }
    if([self switchRecoverRule])
    {
        [result setValue:[self switchRecoverRule] forKey:@"switchRecoverRule"];
    }
    if([self requestHeaders])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self requestHeaders] count]; i++) {
            HttpHeader* item = [[self requestHeaders] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"requestHeaders"];
    }
    if([self responseBodyMatch])
    {
        [result setValue:[self responseBodyMatch] forKey:@"responseBodyMatch"];
    }
    if([self responseCodeRanges])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self responseCodeRanges] count]; i++) {
            HttpResponseCodeRange* item = [[self responseCodeRanges] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"responseCodeRanges"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.alarmLimit = [dictionary objectForKey:@"alarmLimit"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.ipBackup01 = [dictionary objectForKey:@"ipBackup01"];
    self.ipBackup02 = [dictionary objectForKey:@"ipBackup02"];
    self.backupAddressList = [dictionary objectForKey:@"backupAddressList"];
    self.monitorEnable = [dictionary objectForKey:@"monitorEnable"];
    self.monitorFreq = [dictionary objectForKey:@"monitorFreq"];
    self.monitorPort = [dictionary objectForKey:@"monitorPort"];
    self.monitorRule = [dictionary objectForKey:@"monitorRule"];
    self.monitorUri = [dictionary objectForKey:@"monitorUri"];
    self.notifyEmailEnable = [dictionary objectForKey:@"notifyEmailEnable"];
    self.notifyMsgBarEnable = [dictionary objectForKey:@"notifyMsgBarEnable"];
    self.notifySmsEnable = [dictionary objectForKey:@"notifySmsEnable"];
    self.protocol = [dictionary objectForKey:@"protocol"];
    self.stopRecoverRule = [dictionary objectForKey:@"stopRecoverRule"];
    self.switchRecoverRule = [dictionary objectForKey:@"switchRecoverRule"];
    NSArray* requestHeadersArray = [dictionary objectForKey:@"requestHeaders"];
    if(requestHeadersArray&&![requestHeadersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [requestHeadersArray count];i++)
        {
            HttpHeader* item = [[HttpHeader alloc]initWithDic:[requestHeadersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.requestHeaders = propertyArray;
    }
    self.responseBodyMatch = [dictionary objectForKey:@"responseBodyMatch"];
    NSArray* responseCodeRangesArray = [dictionary objectForKey:@"responseCodeRanges"];
    if(responseCodeRangesArray&&![responseCodeRangesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [responseCodeRangesArray count];i++)
        {
            HttpResponseCodeRange* item = [[HttpResponseCodeRange alloc]initWithDic:[responseCodeRangesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.responseCodeRanges = propertyArray;
    }
    return self;
}
 @end
 
 


